/******************************************************************************
 *
 * Copyright (c) 2003-2004 PalmSource, Inc. All rights reserved.
 *
 * File: typeinfo
 *
 * Release:
 *
 * Description:
 *
 *
 *****************************************************************************/



#ifndef __PALMSOURCE_CC_HDR_TYPEINFO
#define __PALMSOURCE_CC_HDR_TYPEINFO

#ifdef __EXCEPTIONS
#define __THROW(x) throw(x)
#define __NOTHROW() throw()
#else
#define __THROW(x)
#define __NOTHROW()
#endif

#include <exception> /* for std::exception */

namespace std {

	class bad_cast : public exception {
		/* according to C++ spec: */
	public:
		bad_cast() __NOTHROW();
		bad_cast(const bad_cast&) __NOTHROW();
		bad_cast& operator=(const bad_cast&) __NOTHROW();
		virtual ~bad_cast() __NOTHROW();
		virtual const char* what() const __NOTHROW();
	};

	class bad_typeid : public exception {
		/* according to C++ spec: */
	public:
		bad_typeid() __NOTHROW();
		bad_typeid(const bad_typeid&) __NOTHROW();
		bad_typeid& operator=(const bad_typeid&) __NOTHROW();
		virtual ~bad_typeid() __NOTHROW();
		virtual const char* what() const __NOTHROW();
	};

#pragma define_type_info

	class type_info {
		/* according to C++ spec: */
	public:
		virtual ~type_info();
		bool operator==(const type_info &) const;
		bool operator!=(const type_info &) const;
		bool before(const type_info &) const;
		const char* name() const;
	private:
		type_info (const type_info& rhs);
		type_info& operator= (const type_info& rhs);

		/* according to ARM EABI spec: */
	private:
		const char * __type_name;
	};

}

/* For typeinfo subclasses */
#include <cxxabi.h>

#endif /* __PALMSOURCE_CC_HDR_TYPEINFO */
